home *** CD-ROM | disk | FTP | other *** search
/ Gold Medal Software 5 / Gold Medal Software - Volume 5 (Gold Medal) (1995).iso / utils1 / boot13.arj / BOOT.BAT next >
DOS Batch File  |  1992-09-23  |  4KB  |  138 lines

  1. @echo off
  2. echo off
  3. echo BOOT Utility 1.03
  4. echo FreeWare but Copyright 1992 by Unique Software, All Rights Reserved
  5. echo ===================================================================
  6. if "%1"=="" goto helponly
  7. for %%d in (name NAME Name n N) do if "%1"=="%%d" goto name
  8. for %%d in (save SAVE Save s S) do if "%1"=="%%d" goto save
  9. for %%d in (init INIT Init i I) do if "%1"=="%%d" goto init
  10. for %%d in (list LIST List l L) do if "%1"=="%%d" goto list
  11. for %%d in (delete DELETE Delete del DEL Del d D) do if "%1"=="%%d" goto delete
  12. if exist \boot\%1.aut goto bootit
  13.  
  14. @echo off
  15. echo E R R O R
  16. echo First Parameter "%1" not "name", "save", or existing Boot Pair Name
  17. echo  
  18. :helponly
  19. echo BOOT init (initalize for BOOT.BAT to work)
  20. echo  
  21. echo BOOT name (reports current Boot Pair Name)
  22. echo BOOT name set [Name] (sets current Boot Pair Name to [Name])
  23. echo                      (adds line "BOOTNAME=(name) to end of AUTOEXEC.BAT)
  24. echo  
  25. echo BOOT save (no parameters - updates (saves) current Boot Pair with curent Name)
  26. echo BOOT save [Name] (sets current Boot Pair Name to [Name] then saves Pair)
  27. echo  
  28. echo BOOT list (lists names of boot pairs - *.aut)
  29. echo  
  30. echo BOOT delete [name] (deletes named pair after verification)
  31. echo  
  32. echo BOOT [Name] (reBoots computer to Boot Pair [Name] set)
  33. echo              (first letter abbreviations are valid i-n-s-l-d)
  34. echo -(1) Prepare AUTOEXEC.BAT and CONFIG.SYS to work as you wish
  35. echo --(2) BOOT NAME SET (name) - give the set a name
  36. echo ---(3) BOOT SAVE - save the set
  37. echo ----(4) BOOT (name) - boots with any existing nameD set
  38. goto quit
  39.  
  40. :init
  41. if exist \Boot\nul goto init1
  42. echo Directory "\BOOT" will be used by BOOT to store Boot Pairs.  To stop
  43. echo    creation of "\BOOT" press ^C now.  Any other key will continue with
  44. echo    creation and contination of BOOT.
  45. md \Boot
  46. :init1
  47. if exist wBoot.com goto copyBoot
  48. if exist \boot\wboot.com goto init2
  49. echo WBOOT.COM (supplied with BOOT10.ZIP) not located.
  50. echo WBOOT.COM must be located in the current directory before BOOT.BAT
  51. echo    can continue.  BOOT.BAT will move WBOOT.COM to the \BOOT directory.
  52. goto quit
  53. :copyBoot
  54. copy WBOOT.COM \BOOT
  55. :init2
  56. if exist wboot.com del wboot.com
  57. if exist yorn.com goto copyyorn
  58. if exist \boot\yorn.com goto init3
  59. echo YORN.COM (supplied with BOOT10.ZIP) not located.
  60. echo YORN.COM must be located in the current directory before BOOT.BAT
  61. echo    can continue.  BOOT.BAT will move YORN.COM to the \BOOT directory.
  62. goto quit
  63. :copyyorn
  64. copy YORN.COM \BOOT
  65. :init3
  66. if exist yorn.com del yorn.com
  67. echo "BOOT.BAT initialized"
  68. goto quit
  69.  
  70. :list
  71. dir \boot\*.aut /w
  72. goto quit
  73.  
  74. :delete
  75. :boot delete name
  76. if exist \boot\%2.aut goto ck2delete
  77. echo "%2" Boot Pair Set Not Found
  78. dir \boot\*.aut /w
  79. goto quit
  80. :ck2delete
  81. echo Verify Delete "%2.aut" and "%2.con" ?
  82. \boot\yorn
  83. if errorlevel=1 goto ck3delete
  84. goto quit
  85. :ck3delete
  86. del \boot\%2.aut
  87. if exist \boot\%2.con del \boot\%2.con
  88. if %2==%bootname% set bootname=
  89. goto quit
  90.  
  91. :save
  92. if "%2"=="" goto ck2save
  93. echo Create New Boot Pair "%1.AUT" and "%1.CON" ?
  94. \boot\yorn
  95. if errorlevel=1 goto ck1save
  96. goto quit
  97. :ck1save
  98. set BOOTNAME=%2
  99. :ck2save
  100. if not %BootName%=="" goto save1ok
  101. echo BOOT Pair Set not Named
  102. echo SET with BOOT NAME SET [Name] or BOOT SAVE [Name]
  103. goto quit
  104. :save1ok
  105. if not exist \Boot\%BootName%.con goto save2ok
  106. echo "%BootName%" Pair Name exists...overwrite them?
  107. \Boot\yorn
  108. if errorlevel=1 goto save2ok
  109. goto quit
  110. :save2ok
  111. copy \autoexec.bat \Boot\%BootName%.aut
  112. copy \config.sys \Boot\%BootName%.con
  113. echo BOOT Pair saved as "%bootname%.aut" and "%bootname%.con"
  114. goto quit
  115.  
  116. :name
  117. if not "%3"=="" goto ck1name
  118. if "%2"=="" goto ck2name
  119. echo BOOT Pair Name not specified
  120. goto ck2name
  121. :ck1name
  122. for %%d in (set SET Set s S) do if "%2"=="%%d" goto ck3name
  123. goto ck2name
  124. :ck3name
  125. set BOOTNAME=%3
  126. echo SET BOOTNAME=%3 >> \autoexec.bat
  127. :ck2name
  128. echo BOOT Pair Name is "%BootName%"
  129. goto quit
  130.  
  131. :bootit
  132. cd \Boot
  133. copy %1.aut \autoexec.bat
  134. copy %1.con \config.sys
  135. \boot\wboot
  136. :quit
  137. echo  
  138.